#include "NmCdd.h"
#include "CanNm_Cfg.h"

sNMConditionState Condition_State = {
    PWRCONDITION_NOT,
    PWRCONDITION_NOT,
    NM_TIMEOUT,
    NM_TIMEOUT,
};

static uint16 NM_Timeout_Cnt = NM_CYCLETIME_TIMEOUT;

uint8 NMPreviousState = 0;
uint8 NMCurrentState  = 0;

void NmStateChangeIndCallback_NmGlobalFeatures(const NetworkHandleType nmNetworkHandle, const Nm_StateType nmPreviousState, const Nm_StateType nmCurrentState)
{
    if(ComMConf_ComMUser_CN_DBCNetWork_f94df0c8 == nmNetworkHandle)
    {
        NMPreviousState = nmPreviousState;
        NMCurrentState  = nmCurrentState;
    }
}

void NmRepeatMessageIndCallback_NmGlobalFeatures(const NetworkHandleType nmNetworkHandle) {}

void NmPduReceiveIndCallback_NmGlobalFeatures(const uint8 nmNetworkHandle)
{
    Condition_State.curNMState = NM_NORAML;
    NM_Timeout_Cnt             = NM_CYCLETIME_TIMEOUT;
    NM_Timeout_Cnt =NM_Timeout_Cnt;
}
